Added VM_metrics.get_all.
authorEwan Mellor <ewan@xensource.com>
Wed, 14 Mar 2007 21:04:04 +0000 (21:04 +0000)
committerEwan Mellor <ewan@xensource.com>
Wed, 14 Mar 2007 21:04:04 +0000 (21:04 +0000)
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
tools/python/xen/xend/XendAPI.py
tools/python/xen/xend/XendVMMetrics.py

index 7aadf5f5b13b2b07d3f69d1c0e15473d29873305..62f42e8e023fb1dff066f7d4e3829c76b84e5100 100644 (file)
@@ -1516,6 +1516,9 @@ class XendAPI(object):
     def _VM_metrics_get(self, ref):
         return XendVMMetrics.get_by_uuid(ref)
 
+    def VM_metrics_get_all(self, _):
+        return xen_api_success(XendVMMetrics.get_all())
+
     def VM_metrics_get_record(self, _, ref):
         return xen_api_success(self._VM_metrics_get(ref).get_record())
 
index 8589e35171b797f5cb92dc4477a6daf5c2af2a9c..d531411b30d58d626d0cb6ad346cd326d94fed03 100644 (file)
@@ -31,6 +31,11 @@ class XendVMMetrics:
         return uuid in instances
 
     is_valid_vm_metrics = classmethod(is_valid_vm_metrics)
+
+    def get_all(_):
+        return instances.keys()
+
+    get_all = classmethod(get_all)
    
     def __init__(self, uuid, xend_domain_instance):
         self.uuid = uuid